import org.junit.jupiter.api.Test;

import java.sql.*;
import java.util.Objects;
import java.util.ResourceBundle;

/**
 * @author LittleDesire
 * @description
 * @date 2022-02-16 周三 16:02
 * @since 17
 */
public class tt {
    @Test
    public void c1() throws SQLException {
        Connection connection = DriverManager.getConnection("jdbc:mysql:/by_dbtest?user=root&password=123");
        PreparedStatement preparedStatement = connection.prepareStatement("select version();");
        ResultSet resultSet = preparedStatement.executeQuery();
        if (resultSet.next()) {
            System.out.println(resultSet.getString(1));
        }
    }

    @Test
    public void ss() {
        String path = Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource("main/resources/user.txt")).getPath();
        System.out.println(path);
        ResourceBundle bundle = ResourceBundle.getBundle("");
    }
}
